home *** CD-ROM | disk | FTP | other *** search
/ Aminet 48 / Aminet 48 (2002)(GTI - Schatztruhe)[!][Apr 2002].iso / Aminet / text / edit / vim60rt.lha / Vim / vim60 / syntax / uil.vim < prev    next >
Encoding:
Text File  |  2001-05-01  |  2.8 KB  |  85 lines

  1. " Vim syntax file
  2. " Language:    Motif UIL (User Interface Language)
  3. " Maintainer:    Thomas Koehler <jean-luc@picard.franken.de>
  4. " Last Change:    2001 Jan 15
  5.  
  6. " Quit when a syntax file was already loaded
  7. if version < 600
  8.    syntax clear
  9. elseif exists("b:current_syntax")
  10.   finish
  11. endif
  12.  
  13. " A bunch of useful keywords
  14. syn keyword uilType    arguments    callbacks    color
  15. syn keyword uilType    compound_string    controls    end
  16. syn keyword uilType    exported    file        include
  17. syn keyword uilType    module        object        procedure
  18. syn keyword uilType    user_defined    xbitmapfile
  19.  
  20. syn keyword uilTodo contained    TODO
  21.  
  22. " String and Character contstants
  23. " Highlight special characters (those which have a backslash) differently
  24. syn match   uilSpecial contained "\\\d\d\d\|\\."
  25. syn region  uilString        start=+"+  skip=+\\\\\|\\"+  end=+"+  contains=uilSpecial
  26. syn match   uilCharacter    "'[^\\]'"
  27. syn region  uilString        start=+'+  skip=+\\\\\|\\"+  end=+'+  contains=uilSpecial
  28. syn match   uilSpecialCharacter    "'\\.'"
  29. syn match   uilSpecialStatement    "Xm[^ =(){}]*"
  30. syn match   uilSpecialFunction    "MrmNcreateCallback"
  31. syn match   uilRessource    "XmN[^ =(){}]*"
  32.  
  33. syn match  uilNumber        "-\=\<\d*\.\=\d\+\(e\=f\=\|[uU]\=[lL]\=\)\>"
  34. syn match  uilNumber        "0[xX][0-9a-fA-F]\+\>"
  35.  
  36. syn region uilComment        start="/\*"  end="\*/" contains=uilTodo
  37. syn match  uilComment        "!.*" contains=uilTodo
  38. syn match  uilCommentError    "\*/"
  39.  
  40. syn region uilPreCondit        start="^#\s*\(if\>\|ifdef\>\|ifndef\>\|elif\>\|else\>\|endif\>\)"  skip="\\$"  end="$" contains=uilComment,uilString,uilCharacter,uilNumber,uilCommentError
  41. syn match  uilIncluded contained "<[^>]*>"
  42. syn match  uilInclude        "^#\s*include\s\+." contains=uilString,uilIncluded
  43. syn match  uilLineSkip        "\\$"
  44. syn region uilDefine        start="^#\s*\(define\>\|undef\>\)" end="$" contains=uilLineSkip,uilComment,uilString,uilCharacter,uilNumber,uilCommentError
  45.  
  46. syn sync ccomment uilComment
  47.  
  48. " Define the default highlighting.
  49. " For version 5.7 and earlier: only when not done already
  50. " For version 5.8 and later: only when an item doesn't have highlighting yet
  51. if version >= 508 || !exists("did_uil_syn_inits")
  52.   if version < 508
  53.     let did_uil_syn_inits = 1
  54.     command -nargs=+ HiLink hi link <args>
  55.   else
  56.     command -nargs=+ HiLink hi def link <args>
  57.   endif
  58.  
  59.   " The default highlighting.
  60.   HiLink uilCharacter        uilString
  61.   HiLink uilSpecialCharacter    uilSpecial
  62.   HiLink uilNumber        uilString
  63.   HiLink uilCommentError    uilError
  64.   HiLink uilInclude        uilPreCondit
  65.   HiLink uilDefine        uilPreCondit
  66.   HiLink uilIncluded        uilString
  67.   HiLink uilSpecialFunction    uilRessource
  68.   HiLink uilRessource        Identifier
  69.   HiLink uilSpecialStatement    Keyword
  70.   HiLink uilError        Error
  71.   HiLink uilPreCondit        PreCondit
  72.   HiLink uilType        Type
  73.   HiLink uilString        String
  74.   HiLink uilComment        Comment
  75.   HiLink uilSpecial        Special
  76.   HiLink uilTodo        Todo
  77.  
  78.   delcommand HiLink
  79. endif
  80.  
  81.  
  82. let b:current_syntax = "uil"
  83.  
  84. " vim: ts=8
  85.